package com.whl.sm.vo;

import com.whl.sm.model.system.OrgUserInfo;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

@Data
@NoArgsConstructor
public class RoleOfServiceVo implements Serializable {

    public RoleOfServiceVo(OrgUserInfo orgUserInfo,Integer taskNum){
        if (Objects.nonNull(orgUserInfo)){
            setId(orgUserInfo.getUserId());
            setUserName(orgUserInfo.getUserName());
            setLinkTel(orgUserInfo.getLinkTel());
        }
        if (Objects.nonNull(taskNum)){
            setTaskNum(taskNum);
        }
    }

    /**
     * 用户Id
     */
    private String id;

    /**
     * 用户名称
     */
    private String userName;

    /**
     *  联系电话
     */
    private String linkTel;

    /**
     * 手持工单数量
     */
    private Integer taskNum;
}
